Skip to content

Conversation

@oliverklee
Copy link
Collaborator

No description provided.

@coveralls
Copy link

coveralls commented Feb 9, 2025

Coverage Status

coverage: 49.156%. remained the same
when pulling ede4dd7 on task/more-tests
into 5e05197 on main.

Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way these tests are narrowing-down expected behaviour.

A couple of minor issues, and some comments beyond the scope of this PR.

/**
* @test
*/
public function createPrettyReturnsNewOutputFormatInstance(): void
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "New" is redundant in the test method name, but it's consistent with createCompactReturnsNewOutputFormatInstance, which I signed off 🤷

/**
* @test
*/
public function createPrettyCalledTwoTimesReturnsDifferentInstances(): void
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking (and agreeing) "TwoTimes" is better than "Twice" for non-native-English speaking coders.

{
$newInstance = OutputFormat::createPretty();

self::assertSame([',' => ' '], $newInstance->getSpaceAfterListArgumentSeparators());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just test that the key , has the value {space} - instead of the whole array?

Copy link
Collaborator

@JakeQZ JakeQZ Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe the test method should be renamed to indicate it's checking the whole array by adding On;y at the end of its name.

@oliverklee oliverklee requested a review from JakeQZ February 10, 2025 09:00
@oliverklee
Copy link
Collaborator Author

Updated and repushed.

Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFM now

@JakeQZ JakeQZ merged commit 5c440f3 into main Feb 10, 2025
21 checks passed
@JakeQZ JakeQZ deleted the task/more-tests branch February 10, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants